package com.tkk.monitoring.analyze.config;

import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.ResourceLoader;

import java.io.InputStream;

/**
 * Created by Administrator on 2015/7/9.
 */
public class Config {
    protected String filePath;

    public Config(String filePath) {
        this.filePath = filePath;
    }

    protected InputStream getInputStream() {
        ResourceLoader loader = new DefaultResourceLoader();
        try {
            return loader.getResource("classpath:" + filePath).getInputStream();
        } catch (Exception e) {
            return null;
        }
    }
}
